const path = require('path')
const webpack = require('webpack')

module.exports = {
    context: path.resolve(__dirname, '../'),
    mode: "production",
    entry:  {
        vendor: ['react', 'react-dom']
    },
    output: {
        path: path.resolve(__dirname, '../dll/site'),
        filename: 'dll_[name].js',
        library: "[name]_[hash]"
    },
    plugins: [
        new webpack.DllPlugin({
            path: path.resolve(__dirname, "../dll/site", "[name]-manifest.json"),
            name: "[name]_[hash]"
        })
    ]
}
